package com.boxin.ims.modules.wechat.busi;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.boxin.ims.modules.wechat.entity.NewsReply;
import com.boxin.ims.modules.wechat.entity.WechatMember;


/**
 * @author Administrator
 * @date 2014-4-1
 * @function <p> 会员中心 </p>
 */
@Service
public class ActivityCenterProcessor extends BusinessProcessor {
	

	@Override
	public ProcessMessage process() {
		
		WechatMember  member = memberCheckAndReply();
		List<NewsReply> newsReplyList = new ArrayList<NewsReply>();
		if(member != null){
			//第一项
			NewsReply newsReply = new NewsReply();
			newsReply.setDescription("");
			newsReply.setPicUrl("");
			newsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/myActivity?uid="+user.getId()+"&wechatId="+openId);
			
			newsReply.setTitle("活动中心");
			
			newsReplyList.add(newsReply);
			
			
			//暂时屏闭
			//签到送积分
			/****
			 * 
			NewsReply tosignupNewsReply = new NewsReply();
			tosignupNewsReply.setDescription("");
			tosignupNewsReply.setPicUrl("");
			tosignupNewsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/tosignup?uid="+user.getId()+"&wechatId="+openId);
			
			tosignupNewsReply.setTitle("签到送积分");
			newsReplyList.add(tosignupNewsReply);
			 */
			
			//积分兑换
			NewsReply toexchangeNewsReply = new NewsReply();
			toexchangeNewsReply.setDescription("");
			toexchangeNewsReply.setPicUrl("");
			toexchangeNewsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/toexchange?uid="+user.getId()+"&wechatId="+openId);
			
			toexchangeNewsReply.setTitle("积分兑换");
			newsReplyList.add(toexchangeNewsReply);
			
			//在线秒杀
			NewsReply seckillsNewsReply = new NewsReply();
			seckillsNewsReply.setDescription("");
			seckillsNewsReply.setPicUrl("");
			seckillsNewsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/seckillList?uid="+user.getId()+"&wechatId="+openId);
			
			seckillsNewsReply.setTitle("在线秒杀");
			newsReplyList.add(seckillsNewsReply);
			
			//刮刮卡
//			NewsReply guaguakaNewsReply = new NewsReply();
//			guaguakaNewsReply.setDescription("");
//			guaguakaNewsReply.setPicUrl("");
//			guaguakaNewsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/guaguaka?uid="+user.getId()+"&wechatId="+openId);
//			
//			guaguakaNewsReply.setTitle("刮刮卡");
//			newsReplyList.add(guaguakaNewsReply);
			
			//砸金蛋
			NewsReply eggsNewsReply = new NewsReply();
			eggsNewsReply.setDescription("");
			eggsNewsReply.setPicUrl("");
			eggsNewsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/toEggsLottery?uid="+user.getId()+"&wechatId="+openId);
			
			eggsNewsReply.setTitle("砸金蛋");
			newsReplyList.add(eggsNewsReply);
//			
			//优惠券
			NewsReply findCouponNewsReply = new NewsReply();
			findCouponNewsReply.setDescription("");
			findCouponNewsReply.setPicUrl("");
			findCouponNewsReply.setUrl("http://weixin.zhaotang.net/zt/f/member/findCoupon?uid="+user.getId()+"&wechatId="+openId);
			
			findCouponNewsReply.setTitle("优惠券");
			newsReplyList.add(findCouponNewsReply);
			
			
			
			writeMultiImagesToUser(newsReplyList);
		}
		
		
		return null;
	}

	@Override
	public boolean isNeedBeMember() {
		
		return true;
	}
	
	

}
